﻿using HK.Core.Common.Protocol.Data;
using UnityEngine;

namespace HK.Editor.GUIEx.Protocol.Data
{
    /// <summary>
    /// 接口 : 窗体配置信息
    /// </summary>
    public interface IWindowConf : IJsonData
    {
        /// <summary>
        /// 窗体名
        /// </summary>
        string WinName { get; }
        
        /// <summary>
        /// 标题
        /// </summary>
        string Title { get; }
        
        /// <summary>
        /// 显示区域
        /// </summary>
        Rect DisplayRect { get; }
        
        /// <summary>
        /// 位置
        /// </summary>
        Vector2 Pos { get; }
        
        /// <summary>
        /// 宽度
        /// </summary>
        float Width { get; }
        
        /// <summary>
        /// 高度
        /// </summary>
        float Height { get; }

#region Options

        /// <summary>
        /// 选项
        /// </summary>
        int Options { get; }

        /// <summary>
        /// 展开缩进
        /// </summary>
        bool Expandable { get; }
        
        /// <summary>
        /// 可拖拽
        /// </summary>
        bool Draggable { get; }

        /// <summary>
        /// 可排序
        /// </summary>
        bool Sortable { get; }

        /// <summary>
        /// 可追加
        /// </summary>
        bool Addable { get; }

        /// <summary>
        /// 可移除
        /// </summary>
        bool Removable { get; }

        /// <summary>
        /// 可分页
        /// </summary>
        bool Pageable { get; }

        /// <summary>
        /// 可编辑
        /// </summary>
        bool Editable { get; }

        /// <summary>
        /// 可检索
        /// </summary>
        bool Searchable { get; }

        /// <summary>
        /// 可导入
        /// </summary>
        bool Importable { get; }

        /// <summary>
        /// 可导出
        /// </summary>
        bool Exportable { get; }

        /// <summary>
        /// 可清楚
        /// </summary>
        bool Clearable { get; }
        
        /// <summary>
        /// 可帮助的
        /// <para>* 窗体右上角，工具栏处有帮助按钮</para>
        /// </summary>
        bool Helpful { get; }

#endregion
        
        /// <summary>
        /// 创建世间
        /// </summary>
        string CreateTime { get; }

        /// <summary>
        /// 刷新
        /// </summary>
        void Refresh();
    }
}